package org.dtrd.modules.system.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import org.dtrd.modules.system.entity.SysUserRole;
import org.dtrd.modules.system.entity.bean.SysUserRoleBean;
import org.dtrd.modules.system.mapper.SysUserRoleMapper;
import org.dtrd.modules.system.service.ISysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * <p>
 * 用户角色表 服务实现类
 * </p>
 *
 * @Author scott
 * @since 2018-12-21
 */
@Service
@DS("master")
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements ISysUserRoleService {


    @Autowired
    private SysRoleServiceImpl sysRoleService;

    @Override
    public List<SysUserRoleBean> getUserRoleList(String userid) {
        return baseMapper.getUserRoleList(userid);
//        return list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, userid));
    }
}
